package com.neo.controllor;

import javax.servlet.http.HttpServletRequest;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.neo.entity.Response;

@RestController
@RequestMapping("/userInfo")
public class UserInfoController {
	private Logger logger = LoggerFactory.getLogger(UserInfoController.class);
    /**
     * 用户查询.
     * @return
     */
    @RequestMapping("/view")
    @RequiresPermissions("userInfo_view")
    public Response userInfo(){
    	logger.info("==>" + "userInfo:view");
    	return Response.success().addData("view", "userInfo:view");
    }

    /**
     * 用户添加;
     * @return
     */
    @RequestMapping("/add")
    @RequiresPermissions("userInfo_add")
    public Response userInfoAdd(HttpServletRequest request){
    	logger.info("==>" + "userInfo:add");
        return Response.success().addData("view", "userInfo:add");
    }
    
    /**
     * 用户添加;
     * @return
     */
    @RequestMapping("/update")
    @RequiresPermissions("userInfo_update")
    public Response userInfoUpdate(){
    	logger.info("==>" + "userInfo:update");
    	return Response.success().addData("view", "userInfo:update");
    }

    /**
     * 用户删除;
     * @return
     */
    @RequestMapping("/del")
    @RequiresPermissions("userInfo_del")
    public Response userDel(){
    	logger.info("==>" + "userInfo:del");
        return Response.success().addData("view", "userInfo:del");
    }
}